package top.jacktgq.candychat.pojo.enums;

/**
 * @Author CandyWall
 * @Date 2021/2/19--11:22
 * @Description 通过、拒绝或者忽略好友请求的枚举类
 */
public enum OperateFriendRequestTypeEnum {
    PASS(1, "通过"),
    REFUSE(2, "拒绝"),
    IGNORE(3, "忽略");

    public final Integer type;
    public final String msg;

    OperateFriendRequestTypeEnum(Integer type, String msg) {
        this.type = type;
        this.msg = msg;
    }

    public Integer getType() {
        return type;
    }

    public static String getMsgByType(Integer type) {
        for (OperateFriendRequestTypeEnum operType : OperateFriendRequestTypeEnum.values()) {
            if (operType.getType() == type) {
                return operType.msg;
            }
        }
        return null;
    }
}
